package com.yunfeisoft.business.model;

import com.yunfeisoft.common.base.BaseModel;
import com.yunfeisoft.common.utils.DateUtils;
import org.springframework.util.ObjectUtils;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * ClassName: ElderHospitalization
 * Description: 住院治疗情况从表
 *
 * @Author: Jackie liu
 * Date: 2020-04-04
 */
@Entity
@Table(name = "TT_ELDER_HOSPITALIZATION")
public class ElderHospitalization extends BaseModel implements Serializable {

    /**
     * Field serialVersionUID: 序列号
     */
    private static final long serialVersionUID = 1L;

    /**
     * 老人健康主表id
     */
    @Column
    private String elderHealthId;

    /**
     * 第一次入院时间
     */
    @Column
    private Date hospitalHistory1Start;

    /**
     * 第一次出院时间
     */
    @Column
    private Date hospitalHistory1End;

    /**
     * 第一次住院原因
     */
    @Column
    private String hospitalHistory1Reason;

    /**
     * 第一次住院机构名称
     */
    @Column
    private String hospitalHistory1Orgname;

    /**
     * 第一次住院病案号
     */
    @Column
    private String hospitalHistory1Number;

    /**
     * 类型：1本人住院2家庭住院史
     */
    @Column
    private String type;

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getElderHealthId() {
        return elderHealthId;
    }

    public void setElderHealthId(String elderHealthId) {
        this.elderHealthId = elderHealthId;
    }

    public Date getHospitalHistory1Start() {
        return hospitalHistory1Start;
    }

    public String getHospitalHistory1StartStr() {
        if (hospitalHistory1Start == null) {
            return null;
        }
        return DateUtils.dateToString(hospitalHistory1Start);
    }


    public void setHospitalHistory1Start(Date hospitalHistory1Start) {
        this.hospitalHistory1Start = hospitalHistory1Start;
    }

    public Date getHospitalHistory1End() {
        return hospitalHistory1End;
    }

    public String getHospitalHistory1EndStr() {
        if (hospitalHistory1End == null) {
            return null;
        }
        return DateUtils.dateToString(hospitalHistory1End);
    }

    public void setHospitalHistory1End(Date hospitalHistory1End) {
        this.hospitalHistory1End = hospitalHistory1End;
    }

    public String getHospitalHistory1Reason() {
        return hospitalHistory1Reason;
    }

    public void setHospitalHistory1Reason(String hospitalHistory1Reason) {
        this.hospitalHistory1Reason = hospitalHistory1Reason;
    }

    public String getHospitalHistory1Orgname() {
        return hospitalHistory1Orgname;
    }

    public void setHospitalHistory1Orgname(String hospitalHistory1Orgname) {
        this.hospitalHistory1Orgname = hospitalHistory1Orgname;
    }

    public String getHospitalHistory1Number() {
        return hospitalHistory1Number;
    }

    public void setHospitalHistory1Number(String hospitalHistory1Number) {
        this.hospitalHistory1Number = hospitalHistory1Number;
    }


}